const fs = require("fs");
const path = require("path");
let data = require(path.join(__dirname, "./tmp/c2d7f0ff-0511-11ea-aa47-0a5864604b05-telemetry.json"));

let position_data = data.filter(e => e['_T'] == "LogPlayerPosition"
  && e['character']['name'] == "Ah2tap-_-");
let LOGMATCHSTART = data.filter(e => e['_T'].toUpperCase() == "LOGMATCHSTART")[0];
let playerNames = LOGMATCHSTART.characters.map(e => e.name);
let player1 = playerNames[10];
let positionLogs = data.filter(e => e['_T'] == "LogPlayerPosition"
  && e['character'] && e['character']['name'] == "HeckSniper");
debugger
fs.writeFile(path.join(__dirname, "test-h.json"), JSON.stringify(positionLogs), (err) => {
  console.log("err", err)
})